import service from "@/utils/request";

export default {
    getRolesList(page, limit, roleName) {
        return service.get(`/admin/acl/role/${page}/${limit}?roleName=${roleName}`)
    },
    addRole(roleParams) {
        return service.post('/admin/acl/role/save', roleParams)
    },
    deleteRole(id) {
        return service.delete(`/admin/acl/role/remove/${id}`)
    },
    batchDeleteRole(idList) {
        return service.delete('/admin/acl/role/batchRemove', idList)
    },
    updateRole(roleParams) {
        return service.put('/admin/acl/role/update', roleParams)
    },
    // 树形图api
    getTreeList(roleId) {
        return service.get(`/admin/acl/permission/toAssign/${roleId}`)
    }
}
